<div class="box box-solid">
    <div class="box-body table-responsive no-padding">
        <form role="form" action="#" method="post" id="insight">
            <div class="box-body">
                <div class="form-group">
                    <label>LOGO</label>
                    <span id="logo">
                         
                    </span>
                    <input type="hidden" class="form-control logo_input" name="logo"  value="<?php if (!empty($logo)){ echo $logo;} ?>" />
                    <img src="<?php if (!empty($logo)){ echo '/images/'.$logo.'.png';} ?>" style="max-width:200px;"  class="logo-image" />
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>主机地址</label>
                    <input type="text" class="form-control" name="web_host" id="title" value="<?php if (!empty($web_host)){ echo $web_host;} ?>" />
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>APP首页title</label>
                    <input type="text" class="form-control" name="check_index_text" id="check_index_text" value="<?php if (!empty($check_index_text)){ echo $check_index_text;} ?>" />
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>微信公众二维码</label>
                    <span id="qr_img">
                         
                    </span>
                    <input type="hidden" class="form-control logo_input_2" name="qr_img" id="qr_img_input" value="<?php if (!empty($qr_img)){ echo $qr_img;} ?>" />
                    <img src="<?php if (!empty($qr_img)){ echo '/images/'.$qr_img.'.png';} ?>" style="max-width:200px;"  class="qr_img" />
                   </div>
            </div>  
            <div class="box-body">
                <div class="form-group">
                    <label>阿里大鱼APPKEY</label>
                    <input name="alidayu_appkey" class="form-control" value="<?php if (!empty($alidayu_appkey)){ echo $alidayu_appkey;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>阿里大鱼SECRET</label>
                    <input name="alidayu_secret" class="form-control" value="<?php if (!empty($alidayu_secret)){ echo $alidayu_secret;} ?>"/>
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>最大推送失败次数</label>
                    <input name="max_message_push_times" class="form-control" value="<?php if (!empty($max_message_push_times)){ echo $max_message_push_times;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>Android车货匹配端包名</label>
                    <input name="mi_push_package_name_xhup_android" class="form-control" value="<?php if (!empty($mi_push_package_name_xhup_android)){ echo $mi_push_package_name_xhup_android;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>Android车货匹配端推送秘钥</label>
                    <input name="mi_push_secret_xhup_android" class="form-control" value="<?php if (!empty($mi_push_secret_xhup_android)){ echo $mi_push_secret_xhup_android;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>AndroidTMS端包名</label>
                    <input name="mi_push_package_name_xhu_android" class="form-control" value="<?php if (!empty($mi_push_package_name_xhu_android)){ echo $mi_push_package_name_xhu_android;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>AndroidTMS端推送秘钥</label>
                    <input name="mi_push_secret_xhu_android" class="form-control" value="<?php if (!empty($mi_push_secret_xhu_android)){ echo $mi_push_secret_xhu_android;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>IOS车货匹配端包名</label>
                    <input name="mi_push_package_name_xhup_ios" class="form-control" value="<?php if (!empty($mi_push_package_name_xhup_ios)){ echo $mi_push_package_name_xhup_ios;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>IOS车货匹配端推送秘钥</label>
                    <input name="mi_push_secret_xhup_ios" class="form-control" value="<?php if (!empty($mi_push_secret_xhup_ios)){ echo $mi_push_secret_xhup_ios;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>IOSTMS端包名</label>
                    <input name="mi_push_package_name_xhu_ios" class="form-control" value="<?php if (!empty($mi_push_package_name_xhu_ios)){ echo $mi_push_package_name_xhu_ios;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>IOSTMS推送秘钥</label>
                    <input name="mi_push_secret_xhu_ios" class="form-control" value="<?php if (!empty($mi_push_secret_xhu_ios)){ echo $mi_push_secret_xhu_ios;} ?>"/>
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>JS 信息</label>
                    <textarea name="js_config" class="form-control"><?php if (!empty($js_config)){ echo $js_config;} ?></textarea>
                </div>
            </div>

            <div class="box-body">
                <div class="form-group">
                    <label>网站关键词：</label>
                    <textarea style="height:200px" name="web_keyword" class="form-control"><?php if (!empty($web_keyword)){ echo $web_keyword;} ?></textarea>
                </div>
            </div>


            <div class="box-body">
                <div class="form-group">
                    <label>网站描述：</label>
                    <textarea style="height:200px" name="web_desc" class="form-control"><?php if (!empty($web_desc)){ echo $web_desc;} ?></textarea>
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>推送失败最大次数</label>
                    <input type="text" class="form-control" name="max_message_push_times" id="max_message_push_times" value="<?php if (!empty($max_message_push_times)){ echo $max_message_push_times;} ?>" />
                </div>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>每次推送最大条数</label>
                    <input type="text" class="form-control" name="max_message_push_count" id="max_message_push_count" value="<?php if (!empty($max_message_push_count)){ echo $max_message_push_count;} ?>" />
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>新版本是否必须升级</label>
                    <select class="form-control" name="is_must">
                        <option value="0" <?php if(empty($is_must) || $is_must == 0) echo "selected='selected'" ?>>否</option>
                        <option value="1" <?php if(!empty($is_must) && $is_must == 1) echo "selected='selected'" ?>>是</option>
                    </select>
                </div>
            </div> 
            <div class="box-body">
                <div class="form-group">
                    <label>ICP </label>
                    <input name="icp" class="form-control" value="<?php if (!empty($icp)){ echo $icp;} ?>"/>
                </div>
            </div>
            
            <div class="box-body">
                <div class="form-group">
                    <label>签到赠送积分 </label>
                    <input name="signed_integral" class="form-control" value="<?php if (!empty($signed_integral)){ echo $signed_integral;} ?>"/>
                </div>
            </div>
            
            <div class="box-body">
                <div class="form-group">
                    <label>登录赠送积分 </label>
                    <input name="login_integral" class="form-control" value="<?php if (!empty($login_integral)){ echo $login_integral;} ?>"/>
                </div>
            </div>
            
            <div class="box-body">
                <div class="form-group">
                    <label>发布货源赠送积分 </label>
                    <input name="gorder_integral" class="form-control" value="<?php if (!empty($gorder_integral)){ echo $gorder_integral;} ?>"/>
                </div>
            </div>
            
            <div class="box-body">
                <div class="form-group">
                    <label>确认承运人赠送积分 </label>
                    <input name="tender_integral" class="form-control" value="<?php if (!empty($tender_integral)){ echo $tender_integral;} ?>"/>
                </div>
            </div>
            
            <div class="box-body">
                <div class="form-group">
                    <label>收货赠送积分 </label>
                    <input name="sign_integral" class="form-control" value="<?php if (!empty($sign_integral)){ echo $sign_integral;} ?>"/>
                </div>
            </div>
            
              
            <div class="box-footer">
                <button class="btn btn-primary" type="submit">保存</button>
            </div>
        </form>
    </div>
</div>
<script >
$("#qr_img").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $("#qr_img_input").val(hash);
            var url ='/images/'+hash+'.png';
            $(".qr_img").attr("src",url);
        }
    }
});
$("#share_qr_bg").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $(".share_qr_bg_input").val(hash);
            var url ='/images/'+hash+'.png';
            $(".share_qr_bg_img").attr("src",url);
        }
    }
});
$("#share_qr_ttf").uploadify({
    buttonText : "请选择字体...",
    fileObjName : "file",
    fileTypeExts : "*.ttf;*.ttc;",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $(".share_qr_ttf_input").val(hash);
            $('.share_qr_ttf_a').attr('href','/downlond/'+hash);

        }
    }
});
$("#logo").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $(".logo_input").val(hash);
            var url ='/images/'+hash+'.png';
            $(".logo-image").attr("src",url);
        }
    }
});
$("#mark_img").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $(".mark_img_input").val(hash);
            var url ='/images/'+hash+'.png';
            $(".mark_img-image").attr("src",url);
        }
    }
});
$("#logo_2").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/files/upload",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.hash;
            $(".logo_input_2").val(hash);
            var url ='/images/'+hash+'.png';
            $(".logo-image_2").attr("src",url);
        }
    }
});
$("#bg_two_upload").uploadify({
    buttonText : "请选择图片...",
    fileObjName : "file",
    fileTypeExts : "*.jpg;*.png;*.gif;*.jpeg;*.bmp",
    swf : "/statics/plugins/uploadify/uploadify.swf",
    uploader : "/site/upload?path=/module",
    multi: false,
    onUploadSuccess: function(file, dataStr, response) {
        var data = eval("(" + dataStr + ")");
        if (typeof(data.error) != "undefined") {
            alert(data.error);
        } else {
            var hash=data.key;
            $("#bg_two").val(hash);
            $("#upload-image").attr("src",data.url);
        }
    }
});
$("#videoToUpload").uploadify({
    buttonText : '请选择...',
    fileObjName : 'file',
    fileTypeExts : '*.mp4',
    swf : '/statics/plugins/uploadify/uploadify.swf',
    uploader : '/site/upload?path=/module',
    multi: false,
    onUploadSuccess: function(file, dataStr, response){
        var data = eval('('+dataStr+')');
        if(typeof(data.error) != 'undefined')
        {
            alert(data.error);
        }else{
            $(".video_input").val(data.key);
            $("#downlond").removeClass("hide");
            $(".video_a").attr("href", data.url);
        }
    }
});
$("#service_videoToUpload").uploadify({
    buttonText : '请选择...',
    fileObjName : 'file',
    fileTypeExts : '*.mp4',
    swf : '/statics/plugins/uploadify/uploadify.swf',
    uploader : '/site/upload?path=/module',
    multi: false,
    onUploadSuccess: function(file, dataStr, response){
        var data = eval('('+dataStr+')');
        if(typeof(data.error) != 'undefined')
        {
            alert(data.error);
        }else{
            $(".service_video_input").val(data.key);
            $("#service_downlond").removeClass("hide");
            $(".service_video_a").attr("href", data.url);
        }
    }
});
</script>